Skip to content

Raghav/weakest precondition#41

Merged
raghav198 merged 60 commits into
mainfrom
raghav/weakest-precondition
Jul 10, 2026
Merged

Raghav/weakest precondition#41
raghav198 merged 60 commits into
mainfrom
raghav/weakest-precondition

Conversation

@raghav198

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread include/Verification/TermUtils.h Outdated
Comment thread include/Verification/LoopInvariantGeneration.h Outdated
Comment thread include/Verification/TermUtils.h Outdated
Comment thread include/Verification/VerificationUtils.h
Comment thread include/Verification/WeakestPrecondition.h Outdated
Comment thread lib/Verification/WeakestPrecondition.cpp Outdated
Comment thread lib/Verification/WeakestPrecondition.cpp Outdated
Comment thread lib/Verification/WeakestPrecondition.cpp Outdated
Comment thread lib/Verification/WeakestPrecondition.cpp Outdated
Comment thread lib/Verification/WeakestPrecondition.cpp Outdated
@raghav198 raghav198 requested a review from iangneal July 9, 2026 19:24

@iangneal iangneal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few nits, otherwise LGTM

/// Default z3 + cvc5 portfolio
llvm::SmallVector<SolverInvocationSpec> getWeakestPreconditionPortfolio();

/// Convenient utilities

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doxygen comment will only attach to the nearest function when documentation is auto-generated, so each function needs its own comment. Also this comment is not particularly useful, so you can just remove it since it's pretty straightforward. The checkUnsatWithPortfolio, however, is not obvious to me at first glance.

Comment thread lib/Analysis/ScalarSymbolAnalysis.cpp Outdated
Comment on lines +41 to +42
if (!call || !(call.calleeIsCompute() || call.calleeIsConstrain() ||
call.calleeIsProduct())) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually these should be call.calleeIsStruct*, because these versions only check the name, not if they're within a struct.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same below

Comment thread lib/Analysis/SymbolicStoreAnalysis.cpp Outdated
<< getOrCreate<ScalarLattice>(subcmp);
llvm::dbgs() << "In call: " << call << '\n';
llvm::dbgs().indent(4)
<< "Subcomponent symbol is: " << getOrCreate<ScalarLattice>(subcmp);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These debug prints should be wrapped in LLVM_DEBUG I think

@raghav198 raghav198 requested a review from iangneal July 10, 2026 17:59

@iangneal iangneal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@raghav198 raghav198 merged commit 3efa54b into main Jul 10, 2026
3 checks passed
@raghav198 raghav198 deleted the raghav/weakest-precondition branch July 10, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants